@include('home.public.header')
<!-- SLIDER-BANNER-AREA START -->
<section class="slider-banner-area clearfix">
	<!-- Sidebar-social-media start -->
	<div class="sidebar-social hidden-xs">
		<div class="table">
			<div class="table-cell">
				<ul>
					<li><a href="#" target="_blank" title="Google Plus"><i class="zmdi zmdi-google-plus"></i></a></li>
					<li><a href="#" target="_blank" title="Twitter"><i class="zmdi zmdi-twitter"></i></a></li>
					<li><a href="#" target="_blank" title="Facebook"><i class="zmdi zmdi-facebook"></i></a></li>
					<li><a href="#" target="_blank" title="Linkedin"><i class="zmdi zmdi-linkedin"></i></a></li>
				</ul>
			</div>
		</div>
	</div>
	<!-- Sidebar-social-media start -->
	<div class="banner-left floatleft">
		<!-- Slider-banner start -->

		<div class="slider-banner">
			@foreach($pick_godds as $v)
				<div class="single-banner banner-1">
					<a class="banner-thumb" href="#"><img src="/static/home/img/banner/1.jpg" alt="" /></a>
					<span class="pro-label new-label hidden-md">{{$v ->isnew=1?'新品':''}}</span>
					<span class="price hidden-md">${{$v ->good_price}}</span>
					<div class="banner-brief">
						<h2 class="banner-title hidden-md"><a href="#">{{$v ->good_name}}</a></h2>
						<p class="mb-0 hidden-md">{{$v ->classify_name}}</p>
					</div>
					<a href="/s_product/{{$v->good_id}}" class="button-one font-16px" data-text="Buy now">立即购买</a>
				</div>
			@endforeach
				<div class="single-banner banner-2">
					<a class="banner-thumb" href="#"><img src="/static/home/img/banner/2.jpg" alt="" /></a>
					<div class="banner-brief">
						<h2 class="banner-title hidden-md"><a href="#"></a></h2>
						<p class="hidden-md hidden-sm hidden-xs" id="lead">{{$pick_godds2 ->good_dec}}</p>
						<a href="#" class="button-one font-16px" data-text="Buy now">立即购买</a>
					</div>
				</div>
		</div>

		<!-- Slider-banner end -->
	</div>
	<div class="slider-right floatleft">
		<!-- Slider-area start -->
		<div class="slider-area">
			<div class="bend niceties preview-2">
				<div id="ensign-nivoslider" class="slides">
					@foreach($banner1 as $data)
						<img src="/uploads/{{$data -> banner_path}}" alt="" title="#slider-direction-1"  />
				@endforeach
				<!-- <img src="/static/home/img/slider/slider-1/2.jpg" alt="" title="#slider-direction-2"  />
								<img src="/static/home/img/slider/slider-1/3.jpg" alt="" title="#slider-direction-3"  /> -->
				</div>
				<!-- direction 1 -->
				<div id="slider-direction-1" class="t-cn slider-direction">
					<div class="slider-progress"></div>
					<div class="slider-content t-lfl s-tb slider-1">
						<div class="title-container s-tb-c title-compress">
							<div class="layer-1">
								<div class="wow fadeIn" data-wow-duration="1s" data-wow-delay="0.5s">
									<h2 class="slider-title3 text-uppercase mb-0" >欢迎来到我们的</h2>
								</div>
								<div class="wow fadeIn" data-wow-duration="1.5s" data-wow-delay="1.5s">
									<h2 class="slider-title1 text-uppercase mb-0">家具</h2>
								</div>
								<div class="wow fadeIn" data-wow-duration="2s" data-wow-delay="2.5s">
									<h3 class="slider-title2 text-uppercase" >2021年画廊</h3>
								</div>
								<div class="wow fadeIn" data-wow-duration="2.5s" data-wow-delay="3.5s">
									<a href="#" class="button-one style-2 text-uppercase mt-20" data-text="Shop now">现在去购物</a>
								</div>
							</div>
						</div>
					</div>
				</div>

			</div>
		</div>
		<!-- Slider-area end -->
	</div>
	<!-- Sidebar-social-media start -->
	<div class="sidebar-account hidden-xs">
		<div class="table">
			<div class="table-cell">
				<ul>
					<li><a class="search-open" href="#" title="Search"><i class="zmdi zmdi-search"></i></a></li>
					<li><a href="/login_out" title="退出登录"><i class="zmdi zmdi-lock"></i></a>
						<!-- <div class="customer-login text-left">
						<form action="/register" method="post">
								<h4 class="title-1 title-border text-uppercase mb-30">注册用户</h4>
								<p class="text-gray">If you have an account with us, Please login!</p>
								<input type="text" name="email" placeholder="Email here..." />
								<input type="password" placeholder="Password" />
								<p><a class="text-gray" href="#">Forget your password?</a></p>
								<button class="button-one submit-button mt-15" data-text="login" type="submit">login</button>
							</form>
						</div> -->
					</li>
					<li><a href="/my_account" title="个人中心"><i class="zmdi zmdi-account"></i></a></li>
					<li><a href="/wishlist" title="心愿单"><i class="zmdi zmdi-favorite"></i></a></li>
				</ul>
			</div>
		</div>
	</div>
	<!-- Sidebar-social-media start -->
</section>
<!-- End Slider-section -->
<!-- sidebar-search Start -->
<div class="sidebar-search animated slideOutUp">
	<div class="table">
		<div class="table-cell">
			<div class="container">
				<div class="row">
					<div class="col-sm-8 col-sm-offset-2 p-0">
						<div class="search-form-wrap">
							<button class="close-search"><i class="zmdi zmdi-close"></i></button>
							<form action="#">
								<input type="text" placeholder="Search here..." />
								<button class="search-button" type="submit">
									<i class="zmdi zmdi-search"></i>
								</button>
							</form>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>
<!-- sidebar-search End -->
<!-- PRODUCT-AREA START -->
<div class="product-area pt-80 pb-35">
	<div class="container">
		<!-- Section-title start -->
		<div class="row">
			<div class="col-lg-12">
				<div class="section-title text-center">
					<h2 class="title-border">特色产品</h2>
				</div>
			</div>
		</div>
		<!-- Section-title end -->
		<div class="row cus-row-30 row_list1">
			<div class="product-slider arrow-left-right">
				<!-- Single-product start -->
				<!-- <div id="row_list1"></div> -->
				@foreach($goods_tese as $v)
					<div class="single-product col-lg-12">
						<div class="product-img">
						<!-- <span class="{{$v->isnew}}">{{$v->recommand}}</span> -->
							@if($v -> isnew==1 ) <span class="pro-label new-label">新品</span> @endif
							@if($v->recommand==1) <span class="pro-label sale-label">热销</span> @endif
							<a href="/s_product/{{$v->good_id}}"><img src="/uploads/{{$v->main_img}}" alt="" /></a>
							<div class="product-action clearfix">
								<a href="javascript:;" data-toggle="tooltip" goodid="{{$v -> good_id}}" id="wish" data-placement="top" title="收藏" class="{{$v->color}}"><i class="zmdi zmdi-favorite-outline"></i></a>
								<a href="#" data-toggle="modal"  data-target="#productModal" title="快速浏览"><i class="zmdi zmdi-zoom-in"></i></a>
								<a href="#" data-toggle="tooltip" data-placement="top" title="比较"><i class="zmdi zmdi-refresh"></i></a>
								<a href="javascript:;" data-toggle="tooltip" goodid="{{$v -> good_id}}" id="cart"  data-placement="top" title="加入购物车" class="{{$v->cartColor}}"><i class="zmdi zmdi-shopping-cart-plus"></i></a>
							</div>
						</div>
						<div class="product-info clearfix">
							<div class="fix">
								<h4 class="post-title floatleft"><a href="#">{{$v->good_name}}</a></h4>
								<p class="floatright hidden-sm hidden-xs">{{$v->classify_name}}</p>
							</div>
							<div class="fix">
								<span class="pro-price floatleft">$ {{$v->good_price}}</span>
								<span class="pro-rating floatright">
											<a href="#"><i class="zmdi zmdi-star"></i></a>
											<a href="#"><i class="zmdi zmdi-star"></i></a>
											<a href="#"><i class="zmdi zmdi-star"></i></a>
											<a href="#"><i class="zmdi zmdi-star-half"></i></a>
											<a href="#"><i class="zmdi zmdi-star-half"></i></a>
										</span>
							</div>
						</div>
					</div>
				@endforeach
			</div>
		</div>
	</div>
</div>
<!-- PRODUCT-AREA END -->
<!-- DISCOUNT-PRODUCT START -->
<div class="discount-product-area">
	<div class="container">
		<div class="row">
			<div class="discount-product-slider dots-bottom-right">
				<!-- single-discount-product start -->
				@foreach($banner2 as $v)
					<div class="col-lg-12">
						<div class="discount-product">
							<img src="/uploads/{{$v ->banner_path}}" alt="" />
							<div class="discount-img-brief">
								<div class="onsale">
									<span class="onsale-text">在售</span>
									<span class="onsale-price">$ 80.00</span>
								</div>
								<div class="discount-info">
									<h1 class="text-dark-red hidden-xs">折扣 50%</h1>
									<p class="hidden-xs">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed does eiusmodes tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim venim, quis nostrud exercitation ullamco laboris.</p>
									<a href="#" class="button-one font-16px style-3 text-uppercase mt-5" data-text="Buy now">立即购买</a>
								</div>
							</div>
						</div>
					</div>
				@endforeach

			</div>
		</div>
	</div>
</div>
<!-- DISCOUNT-PRODUCT END -->
<!-- PURCHASE-ONLINE-AREA START -->
<div class="purchase-online-area pt-80">
	<div class="container">
		<div class="row">
			<div class="col-lg-12">
				<div class="section-title text-center">
					<h2 class="title-border">在 Hurst 在线购买</h2>
				</div>
			</div>
		</div>
		<div class="row">
			<div class="col-lg-12 text-center">
				<!-- Nav tabs -->
				<ul class="tab-menu clearfix">
					<li class="active"><a href="#new-arrivals" data-toggle="tab">新品上市</a></li>
					<li><a href="#best-seller"  data-toggle="tab">热卖推荐</a></li>
					<li><a href="#most-view" data-toggle="tab">匠心独运</a></li>
				</ul>
			</div>
			<div class="col-lg-12">
				<!-- Tab panes -->
				<div class="tab-content">
					<div class="tab-pane active" id="new-arrivals">
						<!-- <div id="row_list"></div> -->
						<div class="row">
							<!-- Single-product start -->
							@foreach($goods_news as $v)
								<div class="single-product col-lg-3 col-md-4 col-sm-4 col-xs-12">
									<div class="product-img">
									<!-- <span class="{{$v->isnew}}">{{$v->recommand}}</span> -->
										@if($v -> isnew==1 ) <span class="pro-label new-label">新品</span> @endif
										@if($v->recommand==1) <span class="pro-label sale-label">热销</span> @endif
										<a href="/s_product/{{$v->good_id}}"><img src="/uploads/{{$v->main_img}}" alt="" /></a>
										<div class="product-action clearfix">
											<a href="javascript:;" data-toggle="tooltip" goodid="{{$v -> good_id}}" id="wish" data-placement="top" title="收藏" class="{{$v->color}}"><i class="zmdi zmdi-favorite-outline"></i></a>
											<a href="#" data-toggle="modal"  data-target="#productModal" title="快速浏览"><i class="zmdi zmdi-zoom-in"></i></a>
											<a href="#" data-toggle="tooltip" data-placement="top" title="比较"><i class="zmdi zmdi-refresh"></i></a>
											<a href="javascript:;" data-toggle="tooltip" goodid="{{$v -> good_id}}" id="cart"  data-placement="top" title="加入购物车" class="{{$v->cartColor}}"><i class="zmdi zmdi-shopping-cart-plus"></i></a>
										</div>
									</div>
									<div class="product-info clearfix">
										<div class="fix">
											<h4 class="post-title floatleft"><a href="#">{{$v->good_name}}</a></h4>
											<p class="floatright hidden-sm hidden-xs">{{$v->classify_name}}</p>
										</div>
										<div class="fix">
											<span class="pro-price floatleft">$ {{$v->good_price}}</span>
											<span class="pro-rating floatright">
															<a href="#"><i class="zmdi zmdi-star"></i></a>
															<a href="#"><i class="zmdi zmdi-star"></i></a>
															<a href="#"><i class="zmdi zmdi-star"></i></a>
															<a href="#"><i class="zmdi zmdi-star-half"></i></a>
															<a href="#"><i class="zmdi zmdi-star-half"></i></a>
														</span>
										</div>
									</div>
								</div>
						@endforeach
						<!-- Single-product end -->
						</div>
					</div>
					<div class="tab-pane" id="best-seller">
						<!-- <div id="row_list3"></div> -->
						<div class="row">
							<!-- Single-product start -->
							@foreach($goods_hot as $v)
								<div class="single-product col-lg-3 col-md-4 col-sm-4 col-xs-12">
									<div class="product-img">
									<!-- <span class="{{$v->isnew}}">{{$v->recommand}}</span> -->
										@if($v -> isnew==1 ) <span class="pro-label new-label">新品</span> @endif
										@if($v->recommand==1) <span class="pro-label sale-label">热销</span> @endif
										<a href="/s_product/{{$v->good_id}}"><img src="/uploads/{{$v->main_img}}" alt="" /></a>
										<div class="product-action clearfix">
											<a href="javascript:;" data-toggle="tooltip" goodid="{{$v -> good_id}}" id="wish" data-placement="top" title="收藏" class="{{$v->color}}"><i class="zmdi zmdi-favorite-outline"></i></a>
											<a href="#" data-toggle="modal"  data-target="#productModal" title="快速浏览"><i class="zmdi zmdi-zoom-in"></i></a>
											<a href="#" data-toggle="tooltip" data-placement="top" title="比较"><i class="zmdi zmdi-refresh"></i></a>
											<a href="javascript:;" data-toggle="tooltip" goodid="{{$v -> good_id}}" id="cart"  data-placement="top" title="加入购物车" class="{{$v->cartColor}}"><i class="zmdi zmdi-shopping-cart-plus"></i></a>
										</div>
									</div>
									<div class="product-info clearfix">
										<div class="fix">
											<h4 class="post-title floatleft"><a href="#">{{$v->good_name}}</a></h4>
											<p class="floatright hidden-sm hidden-xs">{{$v->classify_name}}</p>
										</div>
										<div class="fix">
											<span class="pro-price floatleft">$ {{$v->good_price}}</span>
											<span class="pro-rating floatright">
															<a href="#"><i class="zmdi zmdi-star"></i></a>
															<a href="#"><i class="zmdi zmdi-star"></i></a>
															<a href="#"><i class="zmdi zmdi-star"></i></a>
															<a href="#"><i class="zmdi zmdi-star-half"></i></a>
															<a href="#"><i class="zmdi zmdi-star-half"></i></a>
														</span>
										</div>
									</div>
								</div>
						@endforeach
						<!-- Single-product end -->
						</div>
					</div>
					<div class="tab-pane" id="most-view">
						<!-- <div id="row_list4">goods_chair</div> -->
						<div class="row">
							<!-- Single-product start -->
							@foreach($goods_chair as $v)
								<div class="single-product col-lg-3 col-md-4 col-sm-4 col-xs-12">
									<div class="product-img">
									<!-- <span class="{{$v->isnew}}">{{$v->recommand}}</span> -->
										@if($v -> isnew==1 ) <span class="pro-label new-label">新品</span> @endif
										@if($v->recommand==1) <span class="pro-label sale-label">热销</span> @endif
										<a href="/s_product/{{$v->good_id}}"><img src="/uploads/{{$v->main_img}}" alt="" /></a>
										<div class="product-action clearfix">
											<a href="javascript:;" data-toggle="tooltip" goodid="{{$v -> good_id}}" id="wish" data-placement="top" title="收藏" class="{{$v->color}}"><i class="zmdi zmdi-favorite-outline"></i></a>
											<a href="#" data-toggle="modal"  data-target="#productModal" title="快速浏览"><i class="zmdi zmdi-zoom-in"></i></a>
											<a href="#" data-toggle="tooltip" data-placement="top" title="比较"><i class="zmdi zmdi-refresh"></i></a>
											<a href="javascript:;" data-toggle="tooltip" goodid="{{$v -> good_id}}" id="cart"  data-placement="top" title="加入购物车" class="{{$v->cartColor}}"><i class="zmdi zmdi-shopping-cart-plus"></i></a>
										</div>
									</div>
									<div class="product-info clearfix">
										<div class="fix">
											<h4 class="post-title floatleft"><a href="#">{{$v->good_name}}</a></h4>
											<p class="floatright hidden-sm hidden-xs">{{$v->classify_name}}</p>
										</div>
										<div class="fix">
											<span class="pro-price floatleft">$ {{$v->good_price}}</span>
											<span class="pro-rating floatright">
															<a href="#"><i class="zmdi zmdi-star"></i></a>
															<a href="#"><i class="zmdi zmdi-star"></i></a>
															<a href="#"><i class="zmdi zmdi-star"></i></a>
															<a href="#"><i class="zmdi zmdi-star-half"></i></a>
															<a href="#"><i class="zmdi zmdi-star-half"></i></a>
														</span>
										</div>
									</div>
								</div>
						@endforeach
						<!-- Single-product end -->
						</div>
					</div>

				</div>
			</div>
		</div>
	</div>
</div>
<!-- PURCHASE-ONLINE-AREA END -->
<!-- BLGO-AREA START -->
<div class="blog-area pt-55">
	<div class="container">
		<!-- Section-title start -->
		<div class="row">
			<div class="col-lg-12">
				<div class="section-title text-center">
					<h2 class="title-border">来自博客</h2>
				</div>
			</div>
		</div>
		<!-- Section-title end -->
		<div class="row">
			<!-- Single-blog start -->
			@foreach($blog as $v)
				<div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
					<div class="single-blog mt-30">
						<div class="row">
							<div class="col-lg-6 col-md-7 col-sm-7 col-xs-12">
								<div class="blog-info">
									<div class="post-meta fix">
										<div class="post-date floatleft"><span class="text-dark-red">{{date('d',$v->blog_time),$v->blog_time}}</span></div>
										<div class="post-year floatleft">
											<p class="text-uppercase text-dark-red mb-0">{{date('Y-m',$v->blog_time),$v->blog_time}}</p>
											<h4 class="post-title text_content1"><a href="#" tabindex="0">{{$v->blog_title}}</a></h4>
										</div>
									</div>
									<div class="like-share fix">
										<a href="#"><i class="zmdi zmdi-favorite"></i><span>89 Like</span></a>
										<a href="#"><i class="zmdi zmdi-comments"></i><span>59 Comments</span></a>
									</div>
									<p class="text_content4">{{$v->blog_content}}</p>
									<a href="#" class="button-2 text-dark-red">阅读更多</a>
								</div>
							</div>
							<div class="col-lg-6 col-md-5 col-sm-5 col-xs-12">
								<div class="blog-photo">
									<a href="#"><img src="/uploads/{{$v->blog_photo}}" alt="" /></a>
								</div>
							</div>
						</div>
					</div>
				</div>
			@endforeach
			<style>
				.text_content1{
					display: -webkit-box;
					-webkit-box-orient: vertical;
					-webkit-line-clamp: 1;
					overflow: hidden;
				}
				.text_content4{
					display: -webkit-box;
					-webkit-box-orient: vertical;
					-webkit-line-clamp: 4;
					overflow: hidden;
				}
			</style>
			<!-- Single-blog end -->

		</div>
	</div>
</div>
<!-- BLGO-AREA END -->
<!-- SUBSCRIVE-AREA START -->
<div class="subscribe-area pt-80">
	<div class="container">
		<div class="row">
			<div class="col-lg-12">
				<div class="subscribe">
					<form action="#">
						<input type="text" placeholder="Enter your email address"/>
						<button class="submit-button submit-btn-2 button-one" data-text="subscribe" type="submit" >subscribe</button>
					</form>
				</div>
			</div>
		</div>
	</div>
</div>
<!-- SUBSCRIVE-AREA END -->
<style>
	.single-product .product-img img{
		height: 270px;
	}
</style>
@include('home.public.footer')
<script>
	//心愿单
	$(document).on('click',"#wish",function () {
		goodid =  $(this).attr('goodid');
		var falg = $(this).attr('class');
		console.log($(this).attr('goodid'));
		console.log($(this).attr('class'));
		let that = this;
		if(falg == 1) {
			// 	// console.log(1)
			$.ajax({
				type: 'post',
				url: '/wish',
				data: {'goodid':goodid},
				dataType: "html",
				success:function(res){
					if(res==1) {
						// console.log($('#wish .zmdi '))
						$(that).addClass('wishColor');
					}
				}
			})
		} else {
			// console.log(2)
			//取消心愿单
			$.ajax({
				type: 'post',
				url: '/wish_del',
				data: {'goodid':goodid},
				dataType: "html",
				success:function(res){
					if(res==1) {
						// console.log($('#wish .zmdi '))
						$(that).removeClass('wishColor');
						var falg = 1;

					}
					console.log(res);
				}
			})
		}
	});

	//购物车
	$(document).on('click',"#cart",function () {
		goodid =  $(this).attr('goodid');
		var falg = $(this).attr('class');
		let that = this;
		if(falg == 1) {
			// console.log(1)
			$.ajax({
				type: 'post',
				url: '/cart',
				data: {'goodid':goodid},
				dataType: "html",
				success:function(res){
					if(res==1) {
						// console.log($('#wish .zmdi '))
						$(that).addClass('cartColor');
					}
				}
			})
		} else {
			// console.log(2)
			//取消心愿单
			$.ajax({
				type: 'post',
				url: '/cart_del',
				data: {'goodid':goodid},
				dataType: "html",
				success:function(res){
					if(res==1) {
						// console.log($('#wish .zmdi '))
						$(that).removeClass('cartColor');
						var falg = 1;
					}
				}
			})
		}
	});


	//处理商品
	var str = $("#lead").html().replace(/&lt;/g,"<");
	str = str.replace(/&gt;/g,">");
	$("#lead").html(str);
</script>